package com.dayu.structure.filter;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class FemaleFilter implements DayuFilter {


    @Override
    public List<Dayu> genderFilter(List<Dayu> dayuList) {
        ArrayList<Dayu> male = dayuList.stream().filter(dayu -> dayu.getGender().equals("female")).collect(Collectors.toCollection(ArrayList::new));

        return male;
    }

}
